home *** CD-ROM | disk | FTP | other *** search
/ Ghost Rider iactivecard / Ghost Rider iactivecard.iso / pc / chopper_shop.swf / scripts / frame_1 / DoAction_2.as next >
Encoding:
Text File  |  2007-04-10  |  6.6 KB  |  287 lines

  1. function decalFinder()
  2. {
  3.    if(_root.doorID == 1)
  4.    {
  5.       _root.shopdoor._visible = false;
  6.    }
  7.    decalNum = _root.tankID + _root.decalID;
  8.    colorTrans.rgb = _root.colorID;
  9.    colorTrans.alphaMultiplier = _root.alphaID;
  10.    trans.colorTransform = colorTrans;
  11.    ftrans.colorTransform = colorTrans;
  12.    frtrans.colorTransform = colorTrans;
  13.    ptrans.colorTransform = colorTrans;
  14.    pftrans.colorTransform = colorTrans;
  15.    pfrtrans.colorTransform = colorTrans;
  16.    chopper.decal.decal_form.gotoAndStop(decalNum);
  17.    chopper.decal.tanks_mask.gotoAndStop(decalNum);
  18.    poster.chopper.decal.decal_form.gotoAndStop(decalNum);
  19.    poster.chopper.decal.tanks_mask.gotoAndStop(decalNum);
  20.    chopper.front.gotoAndStop(_root.frontID);
  21.    chopper1.front.gotoAndStop(_root.frontID);
  22.    poster.chopper.front.gotoAndStop(_root.frontID);
  23.    poster.chopper1.front.gotoAndStop(_root.frontID);
  24.    chopper.tanks.gotoAndStop(_root.tankID);
  25.    poster.chopper.tanks.gotoAndStop(_root.tankID);
  26.    poster.chopper1.tanks.gotoAndStop(_root.tankID);
  27.    chopper.rear.gotoAndStop(_root.rearID);
  28.    chopper1.rear.gotoAndStop(_root.rearID);
  29.    poster.chopper.rear.gotoAndStop(_root.rearID);
  30.    poster.chopper1.rear.gotoAndStop(_root.rearID);
  31.    chopper.seats.gotoAndStop(_root.seatID);
  32.    poster.chopper.seats.gotoAndStop(_root.seatID);
  33.    chopper.pipes._visible = _root.pipesID;
  34.    poster.chopper.pipes._visible = _root.pipesID;
  35.    chopper.front.skull._visible = _root.skullID;
  36.    poster.chopper.front.skull._visible = _root.skullID;
  37.    forms.gotoAndStop(_root.formID);
  38.    shopdoor._visible = _root.doorID;
  39. }
  40. var colorTrans = new flash.geom.ColorTransform();
  41. var trans = new flash.geom.Transform(chopper.decal);
  42. trans.colorTransform = colorTrans;
  43. var ftrans = new flash.geom.Transform(chopper.rear.fender);
  44. ftrans.colorTransform = colorTrans;
  45. var frtrans = new flash.geom.Transform(chopper.front.fender);
  46. frtrans.colorTransform = colorTrans;
  47. var ptrans = new flash.geom.Transform(poster.chopper.decal);
  48. ptrans.colorTransform = colorTrans;
  49. var pftrans = new flash.geom.Transform(poster.chopper.rear.fender);
  50. pftrans.colorTransform = colorTrans;
  51. var pfrtrans = new flash.geom.Transform(poster.chopper.front.fender);
  52. pfrtrans.colorTransform = colorTrans;
  53. var spray = new Sound();
  54. spray.attachSound("spray");
  55. var laugh = new Sound();
  56. laugh.attachSound("laugh");
  57. var fast = new Sound();
  58. fast.attachSound("fast");
  59. var beep = new Sound();
  60. beep.attachSound("beep");
  61. var wrench = new Sound();
  62. wrench.attachSound("wrench");
  63. var rev = new Sound();
  64. rev.attachSound("rev");
  65. var clink = new Sound();
  66. clink.attachSound("clink");
  67. var torch = new Sound();
  68. torch.attachSound("torch");
  69. chopper.front.skull._visible = false;
  70. chopper.pipes._visible = false;
  71. poster.chopper.front.skull._visible = false;
  72. poster.chopper.pipes._visible = false;
  73. pipes_btn.onRelease = function()
  74. {
  75.    fast.start();
  76.    if(pipes_btn._currentframe == 2)
  77.    {
  78.       _root.pipesID = false;
  79.       pipes_btn.gotoAndStop(1);
  80.    }
  81.    else
  82.    {
  83.       _root.pipesID = true;
  84.       pipes_btn.gotoAndStop(2);
  85.    }
  86.    decalFinder();
  87. };
  88. skull_btn.onRelease = function()
  89. {
  90.    skullspark.play();
  91.    clink.start();
  92.    if(skull_btn._currentframe == 1)
  93.    {
  94.       skull_btn.gotoAndStop(2);
  95.       _root.skullID = true;
  96.       decalFinder();
  97.    }
  98.    else
  99.    {
  100.       _root.skullID = false;
  101.       skull_btn.gotoAndStop(1);
  102.       decalFinder();
  103.    }
  104. };
  105. seat1.onRelease = function()
  106. {
  107.    _root.seatID = 1;
  108.    wrench.start();
  109.    chopper.seatspark.play();
  110.    decalFinder();
  111. };
  112. seat2.onRelease = function()
  113. {
  114.    _root.seatID = 2;
  115.    wrench.start();
  116.    chopper.seatspark.play();
  117.    decalFinder();
  118. };
  119. seat3.onRelease = function()
  120. {
  121.    _root.seatID = 3;
  122.    wrench.start();
  123.    chopper.seatspark.play();
  124.    decalFinder();
  125. };
  126. seat4.onRelease = function()
  127. {
  128.    _root.seatID = 4;
  129.    wrench.start();
  130.    chopper.seatspark.play();
  131.    decalFinder();
  132. };
  133. decal_form1.onRelease = function()
  134. {
  135.    _root.formID = 1;
  136.    _root.decalID = 6;
  137.    decalFinder();
  138. };
  139. decal_form2.onRelease = function()
  140. {
  141.    _root.formID = 2;
  142.    _root.decalID = 0;
  143.    decalFinder();
  144. };
  145. decal_form3.onRelease = function()
  146. {
  147.    _root.formID = 3;
  148.    _root.decalID = 3;
  149.    decalFinder();
  150. };
  151. front1.onRelease = function()
  152. {
  153.    _root.frontID = 1;
  154.    torch.start();
  155.    chopper.frontspark.play();
  156.    decalFinder();
  157. };
  158. front2.onRelease = function()
  159. {
  160.    _root.frontID = 2;
  161.    torch.start();
  162.    chopper.frontspark.play();
  163.    decalFinder();
  164. };
  165. front3.onRelease = function()
  166. {
  167.    _root.frontID = 3;
  168.    torch.start();
  169.    chopper.frontspark.play();
  170.    decalFinder();
  171. };
  172. front4.onRelease = function()
  173. {
  174.    _root.frontID = 4;
  175.    torch.start();
  176.    chopper.frontspark.play();
  177.    decalFinder();
  178. };
  179. tank1.onRelease = function()
  180. {
  181.    _root.tankID = 1;
  182.    clink.start();
  183.    chopper.tankspark.play();
  184.    decalFinder();
  185. };
  186. tank2.onRelease = function()
  187. {
  188.    _root.tankID = 2;
  189.    clink.start();
  190.    chopper.tankspark.play();
  191.    decalFinder();
  192. };
  193. tank3.onRelease = function()
  194. {
  195.    _root.tankID = 3;
  196.    clink.start();
  197.    chopper.tankspark.play();
  198.    decalFinder();
  199. };
  200. tank4.onRelease = function()
  201. {
  202.    _root.tankID = 4;
  203.    clink.start();
  204.    chopper.tankspark.play();
  205.    decalFinder();
  206. };
  207. rear1.onRelease = function()
  208. {
  209.    _root.rearID = 1;
  210.    rev.start();
  211.    decalFinder();
  212. };
  213. rear2.onRelease = function()
  214. {
  215.    _root.rearID = 2;
  216.    rev.start();
  217.    decalFinder();
  218. };
  219. rear3.onRelease = function()
  220. {
  221.    _root.rearID = 3;
  222.    rev.start();
  223.    decalFinder();
  224. };
  225. rear4.onRelease = function()
  226. {
  227.    _root.rearID = 4;
  228.    rev.start();
  229.    decalFinder();
  230. };
  231. decal1.onRelease = function()
  232. {
  233.    spray.start();
  234.    _root.colorID = "0xFFD133";
  235.    _root.alphaID = 0.85;
  236.    decalFinder();
  237. };
  238. decal2.onRelease = function()
  239. {
  240.    spray.start();
  241.    _root.colorID = "0xE0922F";
  242.    _root.alphaID = 0.85;
  243.    decalFinder();
  244. };
  245. decal3.onRelease = function()
  246. {
  247.    spray.start();
  248.    _root.colorID = "0xB81F26";
  249.    _root.alphaID = 0.65;
  250.    decalFinder();
  251. };
  252. decal4.onRelease = function()
  253. {
  254.    spray.start();
  255.    _root.colorID = "0xB5CF48";
  256.    _root.alphaID = 0.65;
  257.    decalFinder();
  258. };
  259. decal5.onRelease = function()
  260. {
  261.    spray.start();
  262.    _root.colorID = "0x7FC2EB";
  263.    _root.alphaID = 0.65;
  264.    decalFinder();
  265. };
  266. decal6.onRelease = function()
  267. {
  268.    spray.start();
  269.    _root.colorID = "0x5A308D";
  270.    _root.alphaID = 0.65;
  271.    decalFinder();
  272. };
  273. decal7.onRelease = function()
  274. {
  275.    spray.start();
  276.    _root.colorID = "0xBDBEC0";
  277.    _root.alphaID = 0.65;
  278.    decalFinder();
  279. };
  280. decal8.onRelease = function()
  281. {
  282.    spray.start();
  283.    _root.colorID = "0x000000";
  284.    _root.alphaID = 0.45;
  285.    decalFinder();
  286. };
  287.